<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>论坛表</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link rel="stylesheet" href="../../lib/layui-v2.5.5/css/layui.css" media="all">
		<link rel="stylesheet" href="../../css/public.css" media="all">
		<style>
			body {
            	background-color: #ffffff;
        	}
    </style>
	</head>
	<body>
		<form class="layui-form layui-form-pane" lay-filter="myForm" id="app">
			<div class="layui-col-xs12 layui-col-md12">
				<div class="layui-form-item" pane>
					<label class="layui-form-label">帖子标题：</label>
					<div class="layui-input-block">
						<input disabled="disabled" v-model="detail.title" type="text" name="title" id="title" autocomplete="off" class="layui-input">
					</div>
				</div>
			</div>
			<div class="layui-col-xs12 layui-col-md12">
				<div class="layui-form-item" pane>
					<label class="layui-form-label">发布人：</label>
					<div class="layui-input-block">
						<input disabled="disabled" v-model="detail.username" type="text" name="username" id="username" autocomplete="off"
						 class="layui-input">
					</div>
				</div>
			</div>
			<div class="layui-col-xs12 layui-col-md12">
				<div class="layui-form-item" pane>
					<label class="layui-form-label">类型：</label>
					<div class="layui-input-block">
						<input disabled="disabled" v-model="detail.isdone" type="text" name="isdone" id="isdone" autocomplete="off" class="layui-input">
					</div>
				</div>
			</div>
			<div class="layui-col-xs12 layui-col-md12">
				<div class="layui-form-item" pane>
					<label class="layui-form-label">内容：</label>
					<div class="layui-input-block" style="padding: 10px;">
						<div disabled="disabled" v-html="detail.content"></div>
					</div>
				</div>
			</div>

		</form>

		<script src="../../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
		<script src="../../js/lay-config.js?v=2.0.0" charset="utf-8"></script>
		<script src="../../js/utils.js" charset="utf-8"></script>
		<script src="../../js/validate.js" charset="utf-8"></script>
		<script src="../../js/vue.js" charset="utf-8"></script>
		<script>
			var vue = new Vue({
				el: '#app',
				data: {
					detail: {
						title: '',
						content: '',
						parentid: '',
						userid: '',
						username: '',
						isdone: '',
					}
				},
				updated: function() {
					layui.form.render('select', 'myForm');
				},
				computed: {},
				methods: {
					jump(url) {
						jump(url)
					}
				}
			})

			layui.use(['layer', 'element', 'jquery', 'form', 'http'], function() {
				var layer = layui.layer;
				var element = layui.element;
				var http = layui.http;
				var jquery = layui.jquery;
				var form = layui.form;

				var id = http.getParam('id');
				http.request('forum/info/' + id, 'get', {}, (res) => {
					form.val(res.data)
					vue.detail = res.data;
				})

			});
		</script>
	</body>
</html>
